package com.qeado.site.dao.ibatis;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.qeado.common.dao.BaseDao;
import com.qeado.site.dao.LinkManageDao;
import com.qeado.site.model.FriendlyLink;

@Repository
@SuppressWarnings("unchecked")
public class LinkManageDaoImpl extends BaseDao implements LinkManageDao{

	public List<FriendlyLink> getLinkListByLink(FriendlyLink link) {
		return getSqlMapClientTemplate().queryForList("getLinkListByLink",link);	
	}

	public void insertNewLink(FriendlyLink link) {
		getSqlMapClientTemplate().insert("saveNewLink",link);
	}

	public void deleteLinkByAddr(FriendlyLink link) {
		getSqlMapClientTemplate().delete("deleteLink",link);
	}

	@Override
	public Object searchFriendlyLinkByAddress(FriendlyLink friendlyLink) {
		return getSqlMapClientTemplate().queryForObject("searchFriendlyLinkByAddress",friendlyLink);	
	}



}
